<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>top</title>
	<link rel="stylesheet" type="text/css" href="css/top.css">
	<script type="text/javascript" src="js/new_file.js"></script>
	<script type="text/javascript">
		$(function(){
			if(${param.action == "purperson"}){
    			$(".topleft a").attr("href","mainPage/main.jsp?action=purperson");
    			$(".user span").html("用户名:${sessionScope.purperson.pname }");
    			$("#out").click(function(){
    				var isp = window.confirm("你确定要退出");
    				if(isp){
    					window.top.location.href="pps?oper=out";
    				}
    			});
    		}else if(${param.action == "shopowner"}){
    			$(".topleft a").attr("href","mainPage/main.jsp?action=shopowner");
    			$(".user span").html("用户名:${sessionScope.shopowner.sname }");
    			$("#out").click(function(){
    				var isp = window.confirm("你确定要退出");
    				if(isp){
    					window.top.location.href="sos?oper=out";
    				}
    			});
    		}else if(${param.action == "clerk"}){
    			$(".topleft a").attr("href","mainPage/main.jsp?action=clerk");
    			$(".user span").html("用户名:${sessionScope.clerk.cname}");
    			$("#out").click(function(){
    				var isp = window.confirm("你确定要退出");
    				if(isp){
    					window.top.location.href="cs?oper=out";
    				}
    			});
    		}
			
		});
	</script>
  </head>
  
  <body class="topbody">
    <div class="topleft">
    	<a href="mainPage/main.jsp" target="_parent"><img src="img/top.jpg"/></a>
    </div>
	    <div class="welcome">
	     	<span>欢迎登录医疗管理系统</span>
	    </div>
	    
	    <div class="topright">      
		    <a href="javascript:void(0)" id="out">退出</a>
		    <div class="user">
		   		 <span></span>
		   	</div>   
		 </div>
  </body>
</html>
